package model

import (
	"gorm.io/gorm"
	"zk3/petpal-service/config"
)

type Beauty struct {
	gorm.Model
	Name       string  `gorm:"type:varchar(30);comment:热门宠物医师"`
	Image      string  `gorm:"type:varchar(500);comment:宠物图片"`
	BeautyName string  `gorm:"type:varchar(30);comment:美容服务名称"`
	Content    string  `gorm:"type:varchar(100);comment:服务描述"`
	Price      float64 `gorm:"type:decimal(10,2);comment:价格"`
}

func Find(b *[]Beauty) error {

	return config.DB.Find(&b).Error
}
func Show(b *Beauty, id int) error {

	return config.DB.Where("id=?", id).First(&b).Error
}